{config_load file=info.conf section="links"}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{#title#}</title>
{#css_style#}{#css_flipPage#}{#js_query#}
	<link href="/scripts/jquery-ui-1.9.1.custom/css/ui-lightness/jquery-ui-1.9.1.custom.css" rel="stylesheet">
	<script src="/scripts/jquery-ui-1.9.1.custom/js/jquery-ui-1.9.1.custom.min.js"></script>
<style type="text/css">
{literal}
.table_yj{width:100%;margin-top:5px;}
.th1_yj{color:#444;background-color: rgb(255,232,196);text-align:center;border:1px solid rgb(255,204,127); height:25px; font-size:14px; font-family:"微软雅黑";line-height:15px;font-weight:bold;}
.th2_yj{color:#444;background-color: rgb(255,232,196);text-align:center;border:1px solid rgb(255,204,127); height:20px; font-size:12px; font-family:"微软雅黑";line-height:15px;font-weight:bold;}
.table_yj td{font-family:Arial;color:#666; background-color: rgb(255,255,255);text-align:center; line-height:16px; border:1px solid rgb(255,204,127);height:40px;}
{/literal}
</style>
</head>
<body>
{include file="head.tpl"}
 <div class="waps">
       <div class="con">     
            <div  class="nopa">
            	<b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b>
                    <div class="pbox">
				<!--左框架开始 -->
						{include file="railway_m_left.tpl"}
						<!--左框架结束-->
						<div class="ls_rbox">
							<div class="am_title"><span class="lsfonts_r">【目的站】列表 </span></div>
							<div class="listers">
                            <div style=" height:28px;">
							<table align="right" > 
								<tr>  
								<td valign="middle">
									目的站：<input id="ze" type="text" class="step_txt" style="width:80px;padding-left:2px;" value="{$ze}"/>
									站代码：<input id="zc" type="text" class="step_txt" style="width:80px;padding-left:2px;" value="{$zc}"/>
								</td> 
								<td valign="middle"> 
									<input type="button" class="btn_such" style=" margin-left:5px" onclick="search(0);"/> 
								</td> 
								<td valign="middle"> 
									<input type="button" class="btn_suchall" style=" margin-left:5px" onclick="search(1);"/> 
								</td> 
								</tr> 
							</table>
                            </div>
					
                            <table class="table_yj">
								<tr>
								    <th class="th1_yj">站代码</th>
								    <th class="th1_yj">目的站(英文)</th>
								    <th class="th1_yj">目的站(中文)</th>
								    <th class="th1_yj">目的站(俄文)</th>
								     <th class="th1_yj">目的站(省市)</th>
								     <th class="th1_yj">操作</th>
								  </tr>
                               {section name=results loop=$userdata}
								<tr>
									<td>{$userdata[results].code}</td>
									<td>{$userdata[results].en}</td>
									<td>{$userdata[results].cn}</td>
									<td>{$userdata[results].ru}</td>
									<td>{$userdata[results].cy}</td>
									<td><a href="javascript:del('{$userdata[results].cn}');">删除</a></td>
								</tr>
								{sectionelse}<tr><td colspan="9">没有搜索到任何记录！</td></tr>{/section}
                                </table>
                            	<table class="zhushi" width="100%">
                              	<tr>
                              	<td align="right">
                                	<input style="margin-right:10px;"  type="button" class="btn_tj" onclick="$('#t_info').fadeIn(1000);"/>
                            	</td></tr>
                            	</table>
                            	<div class="digg">{$pagination}</div>
                            	<div id="t_info" class="warning" style="padding:5px;margin-top:5px;background-color: rgb(255,255,229);border:1px solid rgb(255,204,127);display:none">
									<div class="toclose"><img src="../images/close.png" onclick="$('#t_info').fadeOut(1000);"/></div>
									<table>
										<tr>
											<td style="font-size:14px;font-weight:bold">增加站点:</td>
											<td style="font-size:14px;padding-left:30px;">
												&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
												站代码 ：<input id="eo" type="text"  class="step_txt" maxlength="20"  style="width:160px;" value=""/>
											</td>
											<td></td>
										</tr>
										<tr>
											<td></td>
											<td style="font-size:14px;padding-left:30px;">
												目的站（英文）：<input id="ee" type="text"  class="step_txt" maxlength="20"  style="width:160px;" value=""/>
											</td>
											<td></td>
										</tr>
										<tr>
											<td></td>
											<td style="font-size:14px;padding-left:30px;">
												目的站（中文）：<input id="ec" type="text"  class="step_txt" maxlength="20"  style="width:160px;" value=""/>
											</td>
											<td></td>
										</tr>
										<tr>
											<td></td>
											<td style="font-size:14px;padding-left:30px;">
												目的站（俄文）：<input id="er" type="text"  class="step_txt" maxlength="20"  style="width:160px;" value=""/>
											</td>
											<td></td>
										</tr>
										<tr>
											<td></td>
											<td style="font-size:14px;padding-left:30px;">
												目的站（省市）：<input id="ep" type="text"  class="step_txt" maxlength="20"  style="width:160px;" value=""/>
											</td>
											<td style="padding-left:10px;"><input type="button" class="btn_tj"/ onclick="add();"> </td>
										</tr>
									</table>
								</div>
                            </div>
						</div>
						<!--右框架结束-->
					<div class="clear"></div>
</div></div></div></div>
{include file="foot.tpl"}
<script type="text/javascript">
var es={$end}
{literal}
$(document).ready(function(){
	$( "#ze" ).autocomplete({source: es});
});
function add(){
	var eo=encodeURIComponent($.trim($("#eo").attr("value")));
	var ee=encodeURIComponent($.trim($("#ee").attr("value")));
	var ec=encodeURIComponent($.trim($("#ec").attr("value")));
	var er=encodeURIComponent($.trim($("#er").attr("value")));
	var ep=encodeURIComponent($.trim($("#ep").attr("value")));
	var params ={act:"add",o:eo,e:ee,c:ec,r:er,p:ep};
	$.post('list_e.php',params,function(data) {
		if(data>0){
			window.location.reload();
		}else{
			alert(data);
		}
	});	
}
function del(str){
	if(confirm('确定要删除【'+str+'】吗?')){
		var params ={act:"del",z:encodeURIComponent(str)};
		$.post('list_e.php',params,function(data) {
			if(data>0){
				window.location.reload();
			}else{
				alert(data);
			}
		});	
	}
}
function search(i){
	var ze="";
	var zc="";
	//if(i==0) zz=encodeURIComponent($.trim($("#zz").attr("value")));
	if(i==0) zc=encodeURIComponent($.trim($("#zc").attr("value")));
	if(i==0) ze=encodeURIComponent($.trim($("#ze").attr("value")));
	window.location = "list_e.php?ze="+ze+"&zc="+zc;
}
</script>{/literal}
</body>
</html>